//
// Created by EDZ on 2022/1/5.
//

#include "scope.h"

double Account = 15.37;            // Hides class name Account
void func_scope() {

    class Account Checking{ Account }; // Qualifies Account as
    //  class name

    cout << "Opening account with a balance of: "
         << Checking.GetBalance() << "\n";
}

double Account::GetBalance() const noexcept {
    return balance;
}

Account::Account(double InitialBalance)
        : balance(InitialBalance) {}
